﻿#pragma once
#include "../Common.h"
#include "ShotCutTimeLine.h"

class ShotCutElement
{
public:
    ShotCutElement(){}
    virtual ~ShotCutElement(){}

    virtual void AttachToTimeLine(ShotCutTimeLine TimeLine) = 0;
};

class VideoElement : public ShotCutElement
{
public:
    VideoElement(const JsonSetting& JsonData);
    virtual void AttachToTimeLine(ShotCutTimeLine TimeLine) override;
    
    VideoClip Videos;
    JsonVideoClip JsonVideoData;
};

class AudioElement : public ShotCutElement
{
public:
    AudioElement(const JsonSetting& JsonData, const JsonVideoClip& JsonVideoData);
    virtual void AttachToTimeLine(ShotCutTimeLine TimeLine) override;
    
    JsonAudioClip JsonAudioData;
    AudioClip Audios;
};

class VideoEffectElement : public ShotCutElement
{
public:
    VideoEffectElement(const JsonSetting& JsonData, const JsonVideoClip& JsonVideoData);
    virtual void AttachToTimeLine(ShotCutTimeLine TimeLine) override;
    
    JsonVideoEffectClip JsonVideoEffectData;
    VideoEffectClip VideoEffects;
};

class MaskEffectElement : public ShotCutElement
{
public:
    MaskEffectElement(const JsonSetting& JsonData, const JsonVideoClip& JsonVideoData);
    virtual void AttachToTimeLine(ShotCutTimeLine TimeLine) override;
    
    JsonMaskEffect JsonMaskEffectData;
    MaskEffect MaskEffects;
};

class ImageEffectElement : public ShotCutElement
{
public:
    ImageEffectElement(const JsonSetting& JsonData, const JsonVideoClip& JsonVideoData);
    virtual void AttachToTimeLine(ShotCutTimeLine TimeLine) override;
    
    JsonImageEffect JsonImageEffectData;
    ImageEffect ImageEffects;
};

class FontEffectElement : public ShotCutElement
{
public:
    FontEffectElement(const JsonSetting& JsonData, const JsonVideoClip& JsonVideoData);
    virtual void AttachToTimeLine(ShotCutTimeLine TimeLine) override;
    
    JsonFontEffect JsonFontEffectData;
    FontEffect FontEffects;
};

class CaptionElement : public ShotCutElement
{
public:
    CaptionElement(const JsonSetting& JsonData, const JsonVideoClip& JsonVideoData);
    virtual void AttachToTimeLine(ShotCutTimeLine TimeLine) override;
    
    JsonShotCutCaption JsonCaptionData;
    ShotCutCaption Captions;
};
